﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.TrainingsSchedules>" %>

<%
    var auditoriumsCol = new CRM.Database.Model.TrainingsAuditoriumsCollection();
%>

<%
    Html.DevExpress().ComboBox(settings =>
                                   {
                                       settings.Name = "IdTrainingsPlace";
                                       settings.CallbackRouteValues =
                                           new {Controller = "TC", Action = "TrainingsSchedulesEditPlacesPartial"};
                                       settings.Properties.ValueType = typeof (int);
                                       settings.Properties.TextField = "NameRu";
                                       settings.Properties.ValueField = "IdTrainingsPlace";
                                       settings.Properties.EnableCallbackMode = true;
                                       //settings.Properties.CallbackPageSize = 20;
                                       settings.Properties.ClientSideEvents.BeginCallback =
                                           "function(s, e) { e.customArgs['Country'] = IdTrainingsCource.GetValue(); }";
                                   }).BindList(auditoriumsCol.GetAuditoriumsListByCourseId(Model.IdTrainingsCource)).
        Bind(Model.IdTrainingsPlace).GetHtml();
//}).BindList(DB.GetTrainingsAuditoriumsListByCourse(DB.GetTrainingsCoursebyId(Model.IdTrainingsCource))).Bind(Model.IdTrainingsPlace).GetHtml()
%>